/*

#include <boost/algorithm/string.hpp>
#include <strings.h>
#include <iostream>
#include <vector>

using namespace std;
using namespace boost;

int caculateDomainForURL(string URL){
	vector<string> strs;
	vector<string> elements;
	split(strs, URL, is_any_of("/") );
	//cout << "* size of the vector: " << strs.size() << endl;
	//for (size_t i = 0; i < strs.size(); i++)
	//    cout << i << " "<< strs[i] << endl;


	split(elements, strs[2], is_any_of(".") );
	//cout << "* size of the vector: " << elements.size() << endl;
	//for (size_t i = 0; i < elements.size(); i++)
	//    cout << i << " "<< elements[i] << endl;


	cout << "Feature:URL_Domain:" << elements[2] << endl;
	return 0;
}

int caculateNumberOfLevelsForURL(string URL){
	int numberOfLevels;
	vector<string> strs;
	split(strs, URL, is_any_of("/") );
	//cout << "* size of the vector: " << strs.size() << endl;
	//for (size_t i = 0; i < strs.size(); i++)
	//    cout << i << " "<< strs[i] << endl;
	numberOfLevels = strs.size() -3;
	cout << "Feature:URL_Number_of_Levels:" << numberOfLevels << endl;
	return 0;
}

int caculateLengthForURL(string URL){
	cout << "Feature:URL_Length_of_URL:" << URL.length() << endl;
	return 0;
}


int main(){
	string testURL = "http://www.smartwebby.com/DreamweaverTemplates/templates/business_general_template59.asp";
	cout << "test URL:" << testURL << endl;
	caculateDomainForURL(testURL);
	caculateNumberOfLevelsForURL(testURL);
	caculateLengthForURL(testURL);
}


